<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/app.tld" prefix="app" %>


  <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
      
	  <tr>
	    <td valign="bottom" height="25">
	      <table width="95%" border="0" cellspacing="0" cellpadding="0" height="23">
	        <tr>
	          <td>
	            <table width="100%" border="0" cellspacing="0" cellpadding="0">
	              <tr>
	                <td width="8"><img src="../images/title1_left.gif" width="8" height="23"></td>
	                <td background="../images/title1_bg.gif" align="center" >
	                   <bean:message key="label.ums.listUser" />
	                </td>
					<td width="8" ><img src="../images/title1_right.gif" width="8" height="23" ></td>
					<td align="right" >
					<input type="button" value="<bean:message key="label.ums.createUser" />" 
					class="button" onclick="window.location='editUser.do'">
					</td>
	              </tr>
	            </table>
	          </td>        
	        </tr>
	      </table>
	    </td>
	  </tr>    
	    
      <tr>
        <td>
         <table width="98%" border="0" cellspacing="0" cellpadding="0">
           <tr> 
             <td class="table_bg">
              <table cellSpacing="0" cellPadding="0" width="100%" border="0">
                <tr > 
                  <td valign="top">
                   <table cellSpacing="1" borderColorDark="#ffffff" cellPadding="0"
                          width="100%"  border="0" class="tb">
                       <tr> 
                       <td align="center" class="table_content">
                             <app:page name="users" searchForm="searchUserForm"/>
                         </td>
                       </tr>
                   </table>
                  </td>
                </tr>
                <tr> 
                   <td valign="top">
                     <table cellSpacing="1" borderColorDark="#ffffff" cellPadding="0" width="100%" border="0">
                       <tr class="table_title"> 
                         <td width="11%" align="center">
                            <bean:message key="label.ums.user.account" />
                          </td>
                         <td width="22%" align="center">
                            <bean:message key="label.ums.group.name"/>
                         </td>                         
                         <td width="12%" align="center">
                            <bean:message key="label.ums.user.name" />
                         </td>
                         
                         <td width="22%" align="center">
                            <bean:message key="label.operate" bundle="common"/>
                         </td>
                       </tr>
                      <logic:iterate id="user" name="users">
                      <tr class="table_content"> 
                         <td  height="20"> 
                           <html:link page="/viewUser.do"
        		               paramId="id" paramName="user" 
                               paramProperty="id" styleClass="link">
                               <bean:write name="user" property="account" filter="true"/>
                           </html:link>
                         </td>
                         <td  align="center">
                            <nested:write name="user" property="group.name" filter="true"/>
                          </td>
                         <td  align="center">
                            <bean:write name="user" property="name" filter="true"/>
                          </td>                         
                         <td  align="center">
                  	    
                  	    	<html:link page="/editUser.do"
        		               paramId="id" paramName="user" 
                               paramProperty="id" styleClass="link">
                            <bean:message key="button.edit" bundle="common"/>
                           </html:link>
                           <html:link page="/removeUser.do"
        		               paramId="id" paramName="user" 
                               paramProperty="id" styleClass="link" onclick="return doDelete();">
                            <bean:message key="button.delete" bundle="common"/>
                           </html:link>   
                          </td>
                        </tr>
                        </logic:iterate>
                       
                       </table>
                     </td>
                  </tr>
                   <tr>
		             <td>
		             <table cellSpacing="1" borderColorDark="#ffffff" cellPadding="0"
		                          width="100%"  border="0" class="tb">
		                       <tr> 
		                       <td align="center" class="table_content">
		                           <app:page name="users"/>  
		                         </td>
		                       </tr>
		            </table>
		            
                     </td>
                  </tr>
                 </table>
                </td>
             </tr>
              
            </table>
         </td>
       </tr>
  </table>
<script language=javascript>
<!--

      function doDelete(){
      var message="<bean:message key="prompt.confirm.delete" bundle="common" />?";
      if(confirm(message) == false){
	   return false;
     }else{
       return true;
     }
     }
-->
</script>